package book;
//用户借阅信息类，分别存储用户名Id和借阅图书的Id信息
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 19182
 * Date: 2025-07-11
 * Time: 15:04
 */
public class PairofUidAndBookId {
    private int userId;
    private int bookId;

    public PairofUidAndBookId() {
    }

    public PairofUidAndBookId(int userId, int bookId) {
        this.userId = userId;
        this.bookId = bookId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public String toJson() {
        StringBuilder json = new StringBuilder();
        json.append(userId).append(",");
        json.append(bookId).append(",");
        return json.toString();
    }
}
